public class Demo20 {
    public static void main(String[] args) {
        float a = 1, b = 2 , c,e,sum = 0;
        for (int i = 0; i <= 20; i++) {
            e = b / a;
            sum = sum + e;
            c = b;
            b = a + b;
            a = c;
        }
        System.out.println(sum);
    }
}
